Method for improving modulation transfer function of an image

ABSTRACT

The border of object in an image is blurred and so the modulation transfer function (MTF) of an image is reduced due to the blurred border. This present invention provides a deductive method for determining a border of an object in an image. Then the border of the object therein is amended and so the MTF of image is increased. In regard to an increasingly changeable color image, the present invention provides a deductive method in deciding upon a gray scale of the image to increase the color accuracy in amending an image.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] This invention generally relates to a method for image processing, and more particularly improvement in the modulation transfer function of an image.

[0003] 2. Description of the Prior Art

[0004] Recently, apparatuses for capturing an image are popular and quite a few exist, e.g. a scanner, a digital camera, etc. A light sensing device captures light through optical lenses, which an object radiates or reflects from another light source, and obtains a formation of image of the object. A CCD (charge-coupled device, CCD) device or a CMOS (complementary metal-oxide-semiconductor) device is a common light sensing device that can capture the light to transfer an image digital data.

[0005] The image data can not be completed equal to that which is seen with the human eye, due to the physical limitations or defects of the apparatus. For example, the modulation transfer function of the captured image reduces the result from an insufficient contrast, a blurred formation of images and so forth. The limitations are diffraction, aberrations, chromatism, and the scattering from an external light source and so on. Some limitations can be solved by means of amending the design of the apparatus. For example: amending the curvature of the lenses or the optic axis to solve the aberration; changing the material or the combination of lenses to solve the chromatism; employing rough inner surfaces on the apparatus and spreading black material on the inner surfaces thereof to reduce the scattering of external light. Although, this handling improves the quality of the captured image, but it can not totally overcome the effects and limitations thereof. The captured image still debases a definition and a contrast with the effects.

[0006] The original data (equal to that which is seen with the human eye) of the image is not destroyed but hidden by the effects, e.g. a difference in the brightness between pixels in a border between an object and the background of the image. The ratio in brightness relatively becomes smaller and not so obvious, due to joining the effect into the original data. Hence, the captured image is blurred. The image data comprises the original data and the unneeded external data.

[0007] The advantage of the digital image is that the digital image can function with a logical operation and a logical analysis. Hence, the digital image can be processed with software for enhancing the contrast or increasing the brightness thereof. Nevertheless, the image with enhanced contrast increases the difference in brightness and aliasing, which then becomes non-distinct due to processing the contrast thereof.

[0008] To eliminate external data is hard. The characteristics of external data are do not affect the difference between pixels in the original data of the image. Furthermore, the digital image can function with a logical operation to amend the image data. Therefore, the border between an object and the background of the image can be determined with the characteristic and then the border therebetween is processed for amending the border. Moreover, the amending process is only processed with the border therebetween and not with the object and the background in the image. Hence, the amending process does not change the data of the image expect the border and does not cause a problem with aliasing. In the conventional art, the border is determined with 9 pixels, but in the present invention, the border can be determined with less pixels and the efficiency of the operation is improved.

SUMMARY OF THE INVENTION

[0009] In the conventional art, the captured image is not identical with the original image in sharpness or definition. Furthermore, the captured image is amended with processing image software, which has the aliasing problem. One of objectives of the present invention is to provide a method for improving the modulation transfer function of an image.

[0010] Another objective of present invention is to employ a method for amending the border of an object in the image without changing the border in the image. Therefore, the amended image does not bring about the problem of aliasing.

[0011] Another objective of present invention is to amend the border of an object for reducing the width of the blurred border.

[0012] Another objective of the present invention is to improve the quality of the image with less data and increase the efficiency of the processing image for economizing on time.

[0013] As aforementioned, the present invention provides a method for improving the modulation transfer function of an image. The present invention employs a varying brightness characteristic on the border of an object in an image to determine the border and to amend the border of the image in order to increase the modulation transfer function (MTF) of the image. The width (i.e. the amount of pixels) in the border becomes narrow and so the image becomes distinct. The data of the object does not change due to amending the border of the object in the image. Therefore, the image does not increase the aliasing after amended. Moreover, the method needs less data to amend the MFT of the image and increases the processing efficiency for economizing on time.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014]FIG. 1A is a flow chart of amending vertical border;

[0015]FIG. 1B is a flow chart of amending vertical border with functions;

[0016]FIG. 2A is a flow chart of amending horizontal border;

[0017]FIG. 2B is a flow chart of amending horizontal border with functions;

[0018]FIG. 3A is a flow chart of amending horizontal vertical border;

[0019]FIG. 3B is a flow chart of amending horizontal vertical border with functions; and

[0020]FIG. 4A to 4D is a diagram before amended and after amended, respectively.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0021] Some sample embodiments of the invention will now be described in greater detail. Nevertheless, it should be recognized that the present invention can be practiced in a wide range of other embodiments besides those explicitly described, and the scope of the present invention is expressly not limited expect as specified in the accompanying claims.

[0022] The data of an image comprises respective color values of the primary colors of red, green, and blue. The displaying color of the image mixes the respective colors thereof. Hence, the method of improving the MFT of the image employs the respective color values of three primary colors (RGB) to determine a border of an object in the image.

[0023] In one preferred embodiment, X(i,j) means a color value of one of red, green and blue, and “(i,j)” of X(i,j) means a coordinate (i,j). The “i” of (i,j) means the coordinate value in the horizontal axis, and the “j” means the coordinate value in the vertical axis.

[0024] Referring to FIG. 1A, it is a flow chart of amending vertical border 100 in the preferred embodiment. First, determining vertical border 102 determines with the color values X(i−1,j), X(i,j) and X(i+1,j) of three successive pixels at same color in a vertical axial. If it is a vertical border, the color value gradually reduces or increases, i.e. the brightness of the color gradually reduces or increases. Therefore, the vertical border satisfies the condition of X(i−1,j)<X(i,j)<X(i+1,j)or X(i−1,j)>X(i,j)>X(i+1,j). The function of determining vertical border 102 can be written as:

[X(i+1,j)−X(i,j)][X(i,j)−X(i−1,j)]>0   (1)

[0025] If Eq. (1) is false, amending horizontal border 200 is proceeded. If Eq. (1) is true, determining the horizontal vertical border 104 is proceeded. The function of determining horizontal vertical border 104 can be written as:

[X(i,j+1)−X(i,j)][X(i,j)−X(i,j−1)]>0   (2)

[0026] If Eq. (2) is true, amending the horizontal vertical border 300 is proceeded. If Eq. (2) is false, determining value deflection 106 is proceeded. Determining value deflection 106 determines that the pixel color value of X(i,j) is nearer to the color value of X(i+1,j) or X(i−1,j). The function of determining the value deflection 106 can be written as:

abs[X(i+1,j)−X(i,j)]>abs[X(i−1,j)−X(i,j)]  (3)

[0027] If Eq. (3) is true, it means the pixel color value of X(i,j) is nearer to X(i−1,j), the pixel value of X(i,j) replaces with the average of X(i,j) and X(i−1,j). If Eq. (3) is false, it means the pixel color value of X(i,j) is nearer to X(i+1,j), the pixel value of X(i,j) replaces with the average of X(i,j) and X(i+1,j). When the pixel color value of X(i,j) is nearer to X(i−1,j), the effect in X(i,j) of X(i−1,j) is bigger than of X(i+1,j), i.e. X(i,j) and X(i−1,j) belong to a same bright area or dark area but X(i,j) slightly shifts to X(i+1,j) due to the effect of X(i+1,j). Therefore, X(i,j) must be amended to X(i−1,j). Alike, when the pixel color value of X(i,j) is nearer to X(i+1,j), X(i,j) must be amended to X(i+1,j). In short, X(i,j) is nearer to a minimum of X(i−1,j) and X(i+1,j), X(i,j) is amended to be nearer the minimum 108; X(i,j) is nearer to a maximum of X(i−1,j) and X(i+1,j), X(i,j) is amended to be nearer the maximum 110. Hence, X(i,j) in blurred bright area is amended to become brighter ,or X(i,j) in blurred dark area is amended to become darker for increasing the sharpness of the border in the image. The flow chart for amending the vertical border with functions is as shown in FIG. 1B.

[0028] Referring to FIG. 2A, it is a flow chart for amending the horizontal border 200 in another preferred embodiment of this invention. First, determining the horizontal border 202 is done by using Eq. (1). If it is true, amending the vertical border 100 is proceeded. If it is false, determining horizontal 204 is proceeded to determine the horizontal border with the color values X(i,j−1), X(i,j) and X(i,j+1) of three successive pixels with the same color in a horizontal axial. If it is a horizontal border, the color value is gradually reduced or increased, i.e. the brightness of the color gradually reduces or increases. Therefore, the horizontal border satisfies the condition of X(i,j−1)<X(i,j)<X(i,j+1)or X(i,j−1)>X(i,j)>X(i,j+1). The horizontal border is determined by Eq. (2).

[0029] If Eq. (2) is false, not amended 206 is proceeded due to the pixel (i,j) not a horizontal border or a vertical border. If it is true, determining value deflection 208 is proceeded to determine the pixel color value of X(i,j) which is nearer to the pixel color value of X(i,j+1) or X(i,j−1). The function of determining value deflection 208 can be written as:

abs[X(i,j+1)−X(i,j)]>abs[X(i,j)−X(i,j−1)]  (4)

[0030] If Eq. (4) is true, it means the pixel color value of X(i,j) is nearer to X(i,j−l), the pixel value of X(i,j) replaces the average of X(i,j) and X(i,j−1). If it is false, it means the pixel color value of X(i,j) is nearer to X(i,j+1), the pixel value of X(i,j) replaces the average of X(i,j) and X(i,j+1). When the pixel color value of X(i,j) is nearer to X(i,j−1), the effect in X(i,j) of X(i,j−1) is bigger than of X(i,j+1), i.e. X(i,j) and X(i,j−1) belongs to the same bright area or dark area but X(i,j) slightly shifts to X(i,j+1) due to the effect of X(i,j+1). Therefore, X(i,j) is amended to X(i,j−1). Alike, when the pixel color value of X(i,j) is nearer to X(i,j+1), X(i,j) is amended to X(i,j+1). In short, X(i,j) is nearer to a minimum of X(i,j−1) and X(i,j+1), X(i,j) is amended to be nearer the minimum 210; X(i,j) is nearer to a maximum of X(i,j−1) and X(i,j+1), X(i,j) is amended to be nearer the maximum 212. Hence, X(i,j) in blurred bright area is amended to become brighter, or X(i,j) in blurred dark area is amended to become darker to increase the sharpness of the border in the image. The flow chart for amending the horizontal border with functions is as shown in FIG. 2B.

[0031] Referring to FIG. 3A, it is a flow chart of amending horizontal vertical border 300 in a still another preferred embodiment of this invention. First, determining the vertical border 302 with Eq. (1). If it is false, amending the vertical border 200 is proceeded. If it is true, determining the horizontal vertical 304 is proceeded with Eq. (2). If Eq. (2) is true, determining the horizontal value deflection 306 is proceeded, i.e. X(i,j) is determined nearer to the pixel color value of X(i+1,j) or X(i−1,j) with Eq. (3) in a horizontal direction.

[0032] If Eq. (3) is true, it means the pixel color value of X(i,j) is nearer to X(i−1,j) in the horizontal direction. Furthermore, determining the vertical value deflection 308 determines X(i,j) nearer to the pixel color value of X(i,j+1) or X(i,j−1) with Eq. (4) in a vertical direction. If Eq. (4) is true, it means that the pixel color value of X(i,j) is nearer to X(i−1,j) in the horizontal direction and X(i,j−1) in the vertical direction. Therefore, the X(i,j) replaces the average of X(i,j), X(i−1,j) and X(i,j−1). If Eq. (4) is false, it means that the pixel color value of X(i,j) is nearer to X(i−1,j) in the horizontal direction and X(i,j+1) in the vertical direction. Therefore, the X(i,j) is replaced with the average of X(i,j), X(i−1,j) and X(i,j+1).

[0033] If Eq. (3) is false, it means the pixel color value of X(i,j) is nearer to X(i+1,j) in the horizontal direction. Furthermore, determining vertical value deflection 310 determines X(i,j) nearer to the pixel color value of X(i,j+1) or X(i,j−1) with Eq. (4) in a vertical direction. If Eq. (4) is true, it means that the pixel color value of X(i,j) is nearer to X(i+1,j) in the horizontal direction and X(i,j−1) in the vertical direction. Therefore, the X(i,j) is replaced with the average of X(i,j), X(i+1,j) and X(i,j−1). If Eq. (4) is false, it means that the pixel color value of X(i,j) is nearer to X(i+1,j) in the horizontal direction and X(i,j+1) in the vertical direction. Therefore, the X(i,j) is replaced with the average of X(i,j), X(i+1,j) and X(i,j+1).

[0034] Referring to FIG. 3B, X(i,j) is nearer to a minimum of X(i−1,j) and X(i+1,j) in the horizontal direction and a minimum of X(i,j−1) and X(i,j+1) in the vertical direction, X(i,j) is amended to be nearer to the minimum 312 in the horizontal direction and in the vertical direction. X(i,j) is nearer to a minimum of X(i−1,j) and X(i+1,j) in the horizontal direction and a maximum of X(i,j−1) and X(i,j+1), X(i,j) is amended to be nearer to the minimum in horizontal direction and the maximum in the vertical direction 314. X(i,j) is nearer to a maximum of X(i−1,j) and X(i+1,j) in the horizontal direction and a maximum of X(i,j−1) and X(i,j+1) in the vertical direction, X(i,j) is amended to be nearer to the maximum in the horizontal direction and in the vertical direction 318. X(i,j) is nearer to a maximum of X(i−1,j) and X(i+1,j) in the horizontal direction and a minimum of X(i,j−1) and X(i,j+1), X(i,j) is amended to be nearer to the maximum in horizontal direction and the minimum in the vertical direction 316.

[0035] Any pixel in an image can be determined in a horizontal border, a vertical border, a horizontal vertical border, or not with the aforementioned preferred embodiments. The dark pixel in the border is amended to be darker and brighter pixels in the border are amended to be brighter to increase the sharpness of the border and the MFT of the image. FIG. 4A to 4B is diagram before being amended and after being amended, respectively.

[0036] Moreover, specific weights of X(k,j) and X(i,m) are adjustable. X(i,j) is replaced with

α×X(i,j)+β×X(k,j)+γ×X(i,m)   (5)

[0037] Wherein, X(k,j) is the adjacent pixel of X(i,j) in the horizontal direction with the nearer value of the same color; X(i,m) is the adjacent pixel of X(i,j) in the vertical direction with the nearer value of the same color. The α, β, and γ are of a specific weight respectively, between 0 and 1, and α+β+γ=1

[0038] If X(i,j) is only amended in the horizontal border, β=0. If X(i,j) is only amended in the vertical border, γ=0. A preferred amendment is obtained by a different specific weight according to different states.

[0039] The method for improving MTF of an image in this invention can be employed in the width that exceeds three pixels in the horizontal or vertical direction. For example, the successive five pixels of X(i−2,j), X(i−1,j), X(i,j), X(i+1,j) and X(i+2,j) are in a border of an object in an image, i.e. the color value gradually increases or decreases. The amended color value of X(i,j) is the average of the non-amended X(i,j) and the nearer color value of the non-amended adjacent pixel. Hence, the amended image is easier to differentiate between an object and a background and the MFT of the amended image increases. Furthermore, the width of the border efficiently narrows, as shown in FIG. 4C and FIG. 4D.

[0040] In regard to an increasingly changeable color image, a pixel in a non-border area may be determined as a pixel in a border with only one color of red, green and blue. Hence, the gray scale portion in the image is only determined to avoid a wrong interpretation. The gray scale portion means the portion that one color value of red, green and blue differs less than δ from the other color value thereof. The function of determining gray scale can be written as:

Max[abs(Xr−Xg),abs(Xg−Xb),abs(Xb−Xr)]<δ  (6)

[0041] Wherein, the Xr, Xg, and Xb are the color value of red, green, and blue, respectively. The “abs” means absolute value. The “δ” means the limitation range of determining the gray scale, e.g. δ=21. Hence, amending the vertical border 100, amending the horizontal border 200, and amending the horizontal vertical border 300 is proceeded if the difference between one color value of red, green, and blue and the other color value thereof is less than 21 to avoid the wrong interpretation.

[0042] Although specific embodiments have been illustrated and described, it will be obvious to those skilled in the art that various modifications may be made without departing from what is intended to be limited solely by the appended claims. 

What is claimed is:
 1. A method for improving modulation transfer function of an image, comprising: determining whether a pixel being in a border of an object in an image; and amending a color value of said determined pixel in said border of said object.
 2. The method for improving modulation transfer function of an image according to claim 1, wherein a deductive method for determining said border comprises a vertical deductive function.
 3. The method for improving modulation transfer function of an image according to claim 2, wherein said vertical deductive function is [X(i+1,j)−X(i,j)][X(i,j)−X(i−1,j)]>0 wherein X(i−1,j), X(i,j) and X(i+1,j) are color values of one color of red, green and blue of said pixel in coordinations (i−1,j), (i,j) and(i+1,j), respectively.
 4. The method for improving modulation transfer function of an image according to claim 2, wherein an amended color value of said determined pixel in said border of said object is α×X(i,j)+β×X(k,j) wherein X(k,j) is one of said X(i−1,j) and said X(i+1,j); α and β are specific weights, between 0 to 1, the sum of α and β is
 1. 5. The method for improving modulation transfer function of an image according to claim 4, wherein said α is 0.5 and said β is 0.5.
 6. The method for improving modulation transfer function of an image according to claim 1, wherein a deductive method for determining said border comprises a horizontal deductive function.
 7. The method for improving modulation transfer function of an image according to claim 6, wherein said horizontal deductive function is [X(i,j+1)−X(i,j)][X(i,j)−X(i,j−1)]>0 wherein X(i,j−1), X(i,j) and X(i,j+1) are color values of one color of red, green and blue of said pixel in coordinations (i,j−1), (i,j) and(i,j+1), respectively.
 8. The method for improving modulation transfer function of an image according to claim 6, wherein an amended color value of said determined pixel in said border of said object is α×X(i,j)+β×X(i,k) wherein X(i,k) is one of said X(i,j−1) and said X(i,j+1); α and β are specific weights, between 0 to 1, the sum of α and β is
 1. 9. The method for improving modulation transfer function of an image according to claim 8, wherein said α is 0.5 and said β is 0.5.
 10. The method for improving modulation transfer function of an image according to claim 1, wherein a deductive method for determining said border comprises a horizontal vertical deductive function.
 11. The method for improving modulation transfer function of an image according to claim 10, wherein said horizontal deductive function is [X(i+1,j)−X(i,j)][X(i,j)−X(i−1,j)]>0 [X(i,j+1)−X(i,j)][X(i,j)−X(i,j−1)]>0 wherein X(i−1,j),X(i,j), X(i,j−1), X(i+1,j) and X(i,j+1) are color values of one color of red, green and blue of said pixel in coordinations (i−1,j), (i,j) (i,j−1) (i+1,j) and (i,j+1), respectively.
 12. The method for improving modulation transfer function of an image according to claim 10, wherein an amended color value of said determined pixel in said border of said object is α×X(i,j)+β×X(i,k)+γ×X(m,j) wherein X(m,j) is one of said X(i−1,j) and said X(i+1,j); X(i,k) is one of said X(i,j−1) and said X(i,j+1); α, β and γ are specific weights, between 0 to 1, the sum of α, β and γ is
 1. 13. The method for improving modulation transfer function of an image according to claim 12, wherein said α, said β and said γ is ⅓.
 14. A method for improving modulation transfer function of an image, comprising: determining whether a pixel being in a portion of a gray scale in an image; determining whether a pixel being in a border of an object in an image; and amending a color value of said determined pixel in said border of said object.
 15. The method for improving modulation transfer function of an image according to claim 14, wherein a deductive function for determining said gray scale is Max[abs(Xr−Xg),abs(Xg−Xb),abs(Xb−Xr)]<δwherein Xr is a red color value of said pixel; Xg is a green color value of said pixel; Xb is a blue color value of said pixel; δ is a value between 0 and
 21. 16. The method for improving modulation transfer function of an image according to claim 14, wherein a deductive function for determining whether a pixel being in a border comprises a horizontal and a vertical deductive function.
 17. The method for improving modulation transfer function of an image according to claim 14, wherein said horizontal deductive method and said vertial deductive method respective are [X(i+1,j)−X(i,j)][X(i,j)−X(i−1,j)]>0 [X(i,j+1)−X(i,j)][X(i,j)−X(i,j−1)]>0 wherein X(i−1,j),X(i,j), X(i,j−1), X(i+1,j) and X(i,j+1) are color values of one color of red, green and blue of said pixel in coordinations (i−1,j), (i,j) (i,j−1) (i+1,j) and (i,j+1), respectively.
 18. The method for improving modulation transfer function of an image according to claim 16, wherein an amended color value of said determined pixel in said border of said object is α×X(i,j)+β×X(i,k)+γ×X(m,j) wherein X(m,j) is one of said X(i−1,j) and said X(i+1,j); X(i,k) is one of said X(i,j−1) and said X(i,j+1); α, β and γ are specific weights, between 0 to 1, the sum of α, β and γ is
 1. 